#include "entry.hpp"

int entry::hash() {
	unsigned int res=0;
	res=res*12345+time;
	res=res*12345+place;
	res=res*12345+group;
	res=res*12345+subject;
	res=res*12345+teacher;
	return res;
}

int entry::operator !=(entry k) {
	if (time!=k.time) return 1;
	if (place!=k.place) return 1;
	if (subject!=k.subject) return 1;
	if (teacher!=k.teacher) return 1;
	if (group!=k.group) return 1;
	return 0;
}


std::ostream& operator <<(std::ostream& cout, entry a) {
	return cout << a.time << ' ' << a.place << ' ' << a.subject << ' ' << a.teacher << ' ' << a.group << endl;
}

std::istream& operator >>(std::istream&, entry a) {
	return cin >> a.time >> a.place >> a.subject >> a.teacher >> a.group;
}
